/*
 * main.cpp
 *
 *  Created on: 2011-10-17
 *      Author: mateusz
 *
 *  Arguments:
 *  	-n INT max tasks to schedule; default: INFINITY
 *  	-in STRING input file name; default: stdin
 *  	-out STRING output file name; default: stdout
 */

#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <list>
#include <deque>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <utility>
#include <sstream>
#include <cstring>
#include <string>

#include <iostream>

#include "parser.h"
#include "Config.h"

using namespace std;

#define INFTY 1000000001
#define EPS 10e-9

int main(int argc, char* argv[]) {
	Config* config = new Config();
	Parser* p = new Parser();

	config->build(argc, argv);
	cout << "config: n = " << config->getMaxJobs() << "; input = " << config->getInputFile()
			<< "; output = " << config->getOutputFile() << endl;

	if (!(p->loadData(config->getInputFile(), config->getMaxJobs(), config->getCommentDelimiter()))) {
		cerr << "Cannot load data from " << config->getInputFile() << endl;
		exit(1);
	}

	delete p;
	delete config;

	return 0;
}

